package com.store.service;

import com.store.entity.Address;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author cai
 * @since 2022-07-12
 */
public interface IAddressService extends IService<Address> {
    /**
     * 增加新的地址
     * @param uid
     * @param address
     */

    void addAddress(int uid,String username,Address address);


    /**
     * 通过uid查询用户所有的收货地址
     * @param uid
     * @return  用户所有的Address
     */
    List<Address> selectAllAddress(int uid);

    /**
     * 设置默认收货地址
     * @param aid
     * @param uid
     * @return
     */
    Void setDefault(int aid,int uid);

    /**
     * 收货地址逻辑删除
     * @param aid
     * @param uid
     * @return
     */
    Void deleteAddress(int aid,int uid);
}
